'use strict'

const Koa = require('koa');
const http = require('http');
const path = require('path');
const serve = require('koa-static');
const SocketIo = require('socket.io');

const hostname = '127.0.0.1';
const port = 3000;

const app = new Koa();

const server = http.createServer(app.callback());
const io = SocketIo(server);
app.use(serve(path.join(__dirname, 'web')));

server.listen(port, hostname, () => {
    console.log(`server run at http://${hostname}:${port}`);
})